package com.华为OD;

import java.util.Scanner;

public class t1字符串分割 {
    private static String f(String s){
        int upper = s.length()-s.replaceAll("[A-Z]","").length();
        int lower = s.length()-s.replaceAll("[a-z]","").length();
        if(upper>lower)
            return s.toUpperCase();
        if(lower>upper)
            return s.toLowerCase();
        return s;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int k = in.nextInt();
        in.nextLine();
        String o = in.nextLine();
        int first = o.indexOf('-');
        StringBuilder sb = new StringBuilder(o.substring(first+1).replace("-",""));

        int i =0;
        StringBuilder ans = new StringBuilder(o.substring(0,first));
        while (i+k<sb.length()){
            ans.append('-');
            ans.append(f(sb.substring(i,i+k)));
            i+=k;
        }
        ans.append('-');
        ans.append(f(sb.substring(i)));
        System.out.println(ans);
    }
}
